<?php

namespace App\Services\ContractSign;

use App\Services\ContractSign\Drivers\JunziqianContractSigner;
use App\Services\ContractSign\Drivers\LogContractSigner;
use Illuminate\Support\Manager;

class ContractSignManager extends Manager
{
    public function getDefaultDriver()
    {
        return $this->config->get('contract-sign.default', 'log');
    }

    protected function createLogDriver(): ContractSigner
    {
        return new LogContractSigner();
    }

    protected function createJunziqianDriver(): ContractSigner
    {
        $config = $this->config->get('contract-sign.drivers.junziqian', []);

        return new JunziqianContractSigner($config);
    }
}
